package com.frxuexi.base.net

import com.frxuexi.base.bean.HomeBean
import com.frxuexi.base.bean.HourseDetailBean
import com.frxuexi.base.bean.VideoBean
import com.frxuexi.base.bean.VideoCommentBean
import com.frxuexi.base.bean.VideoCommentBeanItem
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ApiService {

    @GET("/appapi/v9_9_2/index?platform=android&sign=a1c2238d6ccceaff19980b3358da373c&longitude=116.416632&m_channel=360Market&dataSource=HEFEI&version=v9_9_2&latitude=39.922705&timestamp=1717654589749&isRecommend=true&devModel=5.1.1&devId=ZmEdK0aJLXMDAGc68iHFuuXG")
    suspend fun getHomeMessages():Res<HomeBean>


    @GET("/appapi/v9_9_2/room/detail?platform=android&sign=a95f8b8c62d53b0db488312a3c0a2c82&m_channel=360Market&dataSource=HEFEI&version=v9_9_2&timestamp=1717655450367&devModel=5.1.1&devId=ZmEdK0aJLXMDAGc68iHFuuXG&origin=other&bizType=SALE&id=504589887")
    suspend fun getHourseDetail():Res<HourseDetailBean>

    @GET("/video/findVideos?pageSize=20")
    suspend fun getVideos(@Query("currentPage") currentPage:Int):Res<VideoBean>


    @GET("/comment/getCommentByVideoId")
    suspend fun getVideoComment(@Query("videoId") videoId:Int):Res<VideoCommentBean>

    @POST("/comment/comment")
    suspend fun comment(@Body body: RequestBody):Res<VideoCommentBean>

    @GET("/video/findVideoByName")
    suspend fun findVideoByName(@Query("keywords") keywords:String):Res<VideoBean>

    @POST("/fav/love")
    suspend fun love(@Query("videoId")videoId:Int):Res<String>

    @POST("/fav/nolove")
    suspend fun nolove(@Query("videoId")videoId:Int):Res<String>

    @POST("/guanzhu/guanzhu")
    suspend fun gaunzhu(@Body body: RequestBody):Res<String>

    @POST("/guanzhu/noguanzhu")
    suspend fun noguanzhu(@Body body: RequestBody):Res<String>
}